<{*积分明细*}>
<{include file="top.html" }>
</head>
<body style="background:#FFF;">
    <!--<header><a class="left_link" href="javascript:void(0);"></a>积分明细<a class="right_link" href="<{$POINT_RULE_URL}>">规则</a></header>-->
	<div class="xy-panel">
		<div class="xy-panel-top">
			<div class="xy-titlebar">
				<div class="xy-titlebar-left">
					<a class="insertBefore_left_arrow_gray" href="javascript:void(0);"></a>
				</div>
				<div class="xy-titlebar-title">积分明细</div>
				<div class="xy-titlebar-right">
					<a class="insertBefore_right_arrow_gray" href="<{$POINT_RULE_URL}>">规则</a>
				</div>
			</div>
		</div>
		<div class="xy-panel-content" style="bottom:0; background:#FFF;">
			<{if count($list)>0}>
			<table class="jfmx_con" border="0" cellpadding="0" cellspacing="0">
				<thead>
				<tr>
					<td>时间</td>
					<td>详情</td>
					<td>积分</td>
				</tr>
				</thead>
				<tbody id="pointDetailList">
				<{include file="Point/pointDetailItem.html" }>

				</tbody>
			</table>
			<div id="load_container">

				<{if $next==1}>
				<a href="javascript:load_more();" id="load_more"><span>加载更多</span></a><br>
				<{/if}>
			</div>
			<{else}>
				<div class="none-box">
				<span class="integral-icon"></span>
				<dl>您还没有积分变动记录</dl>
				</div>
			<{/if}>
		</div>
	</div>

	<{include file="signBody.html"}>

</body>
</html>
<script>

	//拖动加载
	var  flagData  =  true;
	var  flagAjax  =  true;
	var  page      =  2;
	//加载
	function  load_more(){

		$("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif")  center  center  no-repeat;background-size:30px  30px;'});
		$("#load_more  span").html('正在加载...');
		if(!  flagAjax){
			return  false;
		}
		flagAjax  =  false;
		$.post("<{u('pointDetailMore')}>",{p:page} , function(data){
			flagAjax  =  true;
			if(data.data)  {

				$("#pointDetailList").append(data.data);
				$("#load_more  span").html('加载更多');
				page++;
				$("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif")  center  center  no-repeat;background-size:30px  30px;'});
			} else {
				flagData  =  false;
				$("#load_container").html('<a  href="javascript:;"  id="load_more"><span>没有更多啦</span></a>');
				$("#load_more").css({'background':'url("")'}).css({'padding-top':'0'}).css({'top':'0px'}).css({'position':'relative'});
			}
		},'json');
	}
	var  tmp_scroll  =  0;
	//拖动加载
	$(".xy-panel-content").scroll(function(){
		if  (tmp_scroll  ==  $(this).height()  +  $(this).scrollTop())  {
			return;
		}
		tmp_scroll  =  $(this).height()  +  $(this).scrollTop();
		var  jia_scroll  =  $(this)[0].scrollHeight  -  tmp_scroll;
		if  (jia_scroll  <  100  &&  flagData)  {
			load_more();
		}
	});

</script>


